<?php

require_once dirname(__FILE__).'/../class/functions.php';
require_once dirname(__FILE__).'/../class/user.class.php';

$a = session_id();if(empty($a)) session_start();

$logat = is_logat();

if($logat == 0)
    die("Nu v-ati logat");
else
{
    if( $_SESSION['logat'] == "admin" )
    {
        //echo "sunteti admin";     
        $user=unserialize($_SESSION['userc']);
        //echo list_rez();
        //$admin=1;
        $adm=1;
    }
    else die("Interzis utilizatorilor normali!(Nu aveti drepturi!)");
    
}

?>


<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="icon" href="favicon.jpg" type="image/gif" sizes="16x16" /> 
        <link rel="stylesheet" type="text/css" href="../style/style.css" />
        <title>Panou Administriv</title>
    </head>
<body>
  <? 
      what_header();
      footer(1);
        ?>
        <div id="content">
            <div id="content_inside">
                    <div id="content_inside_sidebar">
                         <ul>
                            <li><a href ="../index.php"> Home</a><br /></li>
                            <li><a href ="admin.php"> Panou Principal</a><br /></li>
                            <li><a href ="p_news.php"> Noutati</a><br /></li>  
                            <li><a href ="p_rezervari.php"> Rezervari</a><br /></li>
                            <li><a href ="p_downloads.php"> Downloads</a><br /></li>                   
                                           
                         </ul>
                                 
                    </div>
            <div id="content_inside_main">
                    <div id="download_stuff" style="display: block">
                    <form method="post">
                    <?
                    $categorii= pt_rezervari("categorii", "categoria");
                    $anii=pt_rezervari("ani", "an");
                    echo $categorii;
                    echo $anii;
                    
                    ?>
                    Cauta: <input type="text" name="keyw" value=""/> 
                    <a href="#" class="grey-button pcb"><span id="down_submit"> Submit</span></a> <br/> <br/>
                    </form>
                    
                    <div id="list_down">
                        <? echo list_downloads($adm); ?>
                        
                    </div>
                    
                    </div>                    
                                
                
                
            </div>
            </div>
            
        </div>

</body>


</html>